
import { RouterModule, Routes } from '@angular/router';
import { ModuleWithProviders } from '@angular/core';
import { DashboardComponent } from "./dashboard/dashboard.component";
import {PageComponent} from "./page.component";
//import {TopComponent} from "./monitor/electricity/top/top.component";


export const routes = [
  { path: 'login',loadChildren: './login/login.module#LoginModule'},
  //{ path: 'top/:data', component: TopComponent },
  //{ path: 'demo/:data',  loadChildren: './demo/demo.module#DemoModule' },
  {
    path: 'page',
    component:PageComponent,
    children:[
      { path: '', redirectTo: 'dashboard', pathMatch: 'full' },
      { path: 'dashboard',  component: DashboardComponent },
      { path: 'operation',loadChildren: './operation/operation.module#OperationModule' },
      { path: 'groupmanagement',loadChildren: './groupmanagement/groupmanagement.module#GroupmanagementModule' },
      { path: 'ordermanagement', loadChildren: './ordermanagement/ordermanagement.module#OrdermanagementModule' },
      { path: 'productmanagement', loadChildren: './productmanagement/productmanagement.module#ProductmanagementModule' },
      { path: 'usermanagement', loadChildren: './usermanagement/usermanagement.module#UsermanagementModule' },
      { path: 'accountfundsmanagement', loadChildren: './accountfundsmanagement/accountfundsmanagement.module#AccountfundsmanagementModule' },
      { path: 'sysmanagement', loadChildren: './sysmanagement/sysmanagement.module#SysmanagementModule' }

    ]
  }
];

export const PageRoute: ModuleWithProviders = RouterModule.forChild(routes);

